#!/usr/bin/env node

const testLine = '- [ ] **1.1** Create a simple backend API endpoint for user authentication';

// Test the regex from task parser
const regex1 = /^\s*-\s+\[([ x\-])\]/;
const regex2 = /^(\s*)-\s+\[([ x\-])\]\s+(.+)/;

console.log('Testing line:', testLine);
console.log('Regex 1 match:', regex1.test(testLine));
console.log('Regex 2 match:', regex2.test(testLine));

// Let's also try the exact pattern
const match = testLine.match(regex2);
if (match) {
  console.log('Match result:', match);
} else {
  console.log('No match found');

  // Let's try a simpler regex
  const simpleRegex = /-\s+\[\s*\]/;
  console.log('Simple regex test:', simpleRegex.test(testLine));

  // Manual breakdown
  console.log('Line starts with "- "?', testLine.startsWith('- '));
  console.log('Contains "[ ]"?', testLine.includes('[ ]'));
}